import jsonp from '@/assets/js/jsonp'
import {
  params,
  options
} from '@/api/config'
import axios from "axios"

export function getSingerList() {
  const url = "https://c.y.qq.com/v8/fcg-bin/v8.fcg"
  const data = Object.assign({}, params, {
    channel: "singer",
    page: "list",
    key: "all_all_all",
    pagesize: "100",
    pagenum: "1",
    hostUin: 0,
    format: "jsonp",
    platform: "yqq",
    needNewCode: 0
  })
  return jsonp(url, data, options)
}
export function getSingerDetail(singerId) {
  const url = "https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg"
  const data = Object.assign({}, params, {
    platform: "yqq",
    needNewCode: 0,
    singermid: singerId,
    order: "listen",
    begin: 0,
    num: 30,
    songstatus: 1
  })
  return jsonp(url, data, options)
}
